//
//  ZYReadModel.m
//  MusicMV
//
//  Created by Eternity on 16/3/17.
//  Copyright © 2016年 Eternity. All rights reserved.
//

#import "ZYReadModel.h"

@implementation ZYReadModel

- (void)setValue:(id)value forKey:(NSString *)key {
    
    [super setValue:value forKey:key];
    
    if ([key isEqualToString:@"tags"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ZYModel *model = [[ZYModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [arr addObject:model];
        }
        self.tags = [NSMutableArray arrayWithArray:arr];
    }
    
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}
@end
